package db

const TableNameVipPrice = TablePrefix + "vip_price"

type VipPrice struct {
	BaseModel
	Num           int64 `gorm:"column:num;type:int(11);default:0;comment:期限(天)" json:"num" form:"num"`                                  // 期限(天)
	ConsumeTypeID uint  `gorm:"column:consume_type_id;type:int(11);default:0;comment:消耗类型id" json:"consumeTypeID" form:"consumeTypeID"` // 消耗类型id
	ConsumeNum    int64 `gorm:"column:consume_num;type:int(11);default:0;comment:消耗数量" json:"consumeNum" form:"consumeNum"`             // 消耗数量
}

func (*VipPrice) TableName() string {
	return TableNameVipPrice
}

type VipPriceHasOneType struct {
	VipPrice
	Types Type `gorm:"foreignKey:ID;references:ConsumeTypeID" json:"types"`
}
